﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DTO;

namespace DAO
{
     public class Search_DAO
    {
        public DataProvider _provider = new DataProvider();
        public Search_DAO()
        {
            _provider.connect();
        }
        public DataTable GetCmdXe()
        {
            string s = "Select * from LoaiSP where PhanBiet = 1 ";
            return _provider.executeQuery(s);
        }
        public DataTable GetCmdLoaiNL()
        {
            string s = "Select * from NLG";
            return _provider.executeQuery(s);
        }
        public DataTable GetBtnSearch(string MaLoaiNL, string MaXe)
        {
            string s = "select TenNLG, SoLuong from NLG where MaLoaiNLG = '"+ MaXe + "' and MaNLG = '"+ MaLoaiNL +"'";                     
            return _provider.executeQuery(s);
        }
    }
}
